package io.byteStream.input;

import java.io.FileInputStream;
import java.io.IOException;

public class FileInputStreamDemo2 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("E:\\javaFileTest\\11.txt");
        //准备容器装,read方法传入数组时返回值是读到了多少个
        byte[] bys1 = new byte[2];
        int len;
        while((len=fis.read(bys1))!=-1){
            String s= new String(bys1,0,len);
            System.out.print(s);
        }
        fis.close();
    }
}
